import 'package:cjybase/base/base_page_state.dart';
import 'package:cjybase/network/net.dart';
import 'package:cjybase_example/page/page_manage.dart';
import 'package:cjybase/util/string_util.dart';

abstract class NetworkPageState extends BasePageState<NetworkPage> {
  String netData = "";

  click() {
    // 首先在main.dart中初始化net
    Net.get("todos", headers: {"qaz": 123}, success: (data) {
      // 成功的
      setState(() {
        netData = data.toString();
      });
    }, error: (error) {
      // 失败
      error.toString().log();
    });
  }
}
